AI Lessons
Lesson 17: AI for Object Detection and Animations

Purpose: Learn how AI identifies and locates objects in images and videos by recognizing visual patterns, bounding boxes and keypoint structures.

No. of Classes

1 - (Time : 1 hour 30 minutes, Laptops/desktops : 10, Students strength : 15 to 20).

Materials Required

Laptop / Desktop with Internet connection / Wi-Fi.

Webcam for live detection.

Common classroom objects (pen, book, bottle, phone, scissors) and drawing paper/markers.

Prior knowledge
  • Images are composed of pixel grids
  • Basic classification vs. identifying visual patterns
  • Familiarity with webcam inputs in previous AI projects
Exercises

Exercise (1) - Bounding Box Fundamentals



  • Examine sample images to identify object boundaries and practice sketching rectangular bounding boxes (x, y, width, height) around distinct items.

Exercise (2) - Real-time Object Detection



  • Use MediaPipe Studio Object Detector to analyze uploaded images and live webcam streams.
  • Click here to open MediaPipe Object Detector
  • Observe bounding box coordinates, confidence scores, and record instances where the model misses, misclassifies or flickers.

Exercise (3) - Character Rigging & Animation



  • Sketch a humanoid character or select a cartoon template, then process it through the Meta Sketch AI animation tool
  • Observe how the AI detects body keypoints (joints, limbs, head) to rig and animate the drawing.

Solutions



Teacher's Instruction:
  1. Differentiate Image Classification vs. Object Detection:
    • Explain that image classification answers "What is this image?", whereas object detection answers "What is in this image and where is it located?"
    • Explain why models use rectangular bounding boxes: computing axis-aligned boxes (x, y, w, h) is computationally faster than drawing exact pixel-perfect silhouettes.
  2. Guide MediaPipe Studio Testing (Exercise 2):
    • Have students test classroom objects (pens, bottles, phones) at various distances and angles.
    • Demonstrate edge cases: overlap objects, turn off overhead lights, or hold objects partially out of frame.
    • Emphasize that confidence scores represent mathematical pattern similarity, not absolute truth.
  3. Explain Keypoint Detection in Animation (Exercise 3):
    • Show how keypoint detection goes beyond bounding boxes by locating specific skeletal joints (elbows, knees, shoulders).
    • Demonstrate how fixing misaligned keypoints manually helps the AI properly warp and animate character limbs without distortion.
  4. Points to Ponder:
    • When you look at a dog, you instantly know it's a dog, even if it's wearing a funny costume or sleeping under a blanket. But an AI needs to see sharp edges, colors, and specific shapes to draw a box around it. Why do you think human brains are so much better at recognizing things in tricky or messy situations than a computer?